﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Timers;
using Oracle.ManagedDataAccess.Client;
using System.Text.RegularExpressions;

using System.Diagnostics;
using System.Collections.Concurrent;
using System.IO;
using SharpDB;
using SharpDB.Entity;
using System.Data.SqlClient;
using System.Data.Common;
using System.Xml.Linq;
using Microsoft.Win32;
using System.Net;
using System.ComponentModel;
using System.Runtime.Serialization;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
//using ConsoleExt;
using System.Web;

namespace SharpDB_ConsoleApp
{
    public class BaseHelper
    {
        public virtual void Say()
        {

        }

    }


    public class MsHelper : BaseHelper
    {
        public override void Say()
        {
            base.Say();
        }
    }




    class Program
    {

        public string StrStr { get; set; }

        static string connStr = @"data source=10.1.19.189\MSSQLSERVER1;uid=aiws;pwd=aiws;database=AIWS;Pooling=true;Connection Timeout=300;";
        static void Main(string[] args)
        {
            //string connStr2 = "Data Source=TAKETRY;password=123456;Initial Catalog=FZ_JingC_LY;User ID=sa";



            DBMgr dbMgr = new DBMgr(DBType.MsSql, connStr);
            var db = dbMgr.DB;
            db.OnError += Db_OnError;

            string sel_sql = "Select * From jc_Dept2 Order By CnShangCSS asc";
            DataTable data = db.QueryTable(sel_sql);





            Console.ReadKey();
        }

        private static void Db_OnError(object sender, OnErrorEventArgs e)
        {
           
        }

        

        static Random rdom = new Random();


        static void SW(Action act)
        {
            Stopwatch wat = new Stopwatch();
            wat.Start();
            act.Invoke();
            wat.Stop();
            long lenTime = wat.ElapsedMilliseconds;
            Console.WriteLine(lenTime);
        }
    }
}
